package com.yunyike.service.impl;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yunyike.dto.SummaryMerchandiseDTO;
import com.yunyike.mapper.MerchandiseMapper;
import com.yunyike.model.Merchandise;
import com.yunyike.service.MerchandiseService;

@Service("merchandiseServiceImpl")
public class MerchandiseServiceImpl implements MerchandiseService{

	private Logger log = LoggerFactory.getLogger(MerchandiseServiceImpl.class);
	
	@Autowired
	private  MerchandiseMapper merchandiseMapper;

	public int deleteByPrimaryKey(String merchandiseId) {
		return merchandiseMapper.deleteByPrimaryKey(merchandiseId);
	}

	public int insert(Merchandise record) {
		return merchandiseMapper.insert(record);
	}

	public int insertSelective(Merchandise record) {
		return merchandiseMapper.insertSelective(record);
	}

	public Merchandise selectByPrimaryKey(String merchandiseId) {
		return merchandiseMapper.selectByPrimaryKey(merchandiseId);
	}

	public int updateByPrimaryKeySelective(Merchandise record) {
		return merchandiseMapper.updateByPrimaryKeySelective(record);
	}

	public int updateByPrimaryKey(Merchandise record) {
		return merchandiseMapper.updateByPrimaryKey(record);
	}

	public List<SummaryMerchandiseDTO> selectSummaryMerchandise(List<Integer> skuStatus){
		return merchandiseMapper.selectSummaryMerchandise(skuStatus);
	}

}
